package com.good.entity;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import javax.persistence.CollectionTable;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@Entity
@Table(name="xx_test3")
@SequenceGenerator(name="myGenerator",sequenceName="xx_test3")
public class Test3 extends BaseEntity{
	/**
	 * 
	 */
	private static final long serialVersionUID = 0000001L;
	private String name;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	private Set<String> setsss=new HashSet<String>();
	@ElementCollection//指定这个是集合元素
	@CollectionTable(name="xx_setsetsss",joinColumns=@JoinColumn(name="test3_id"))//指定存储这个集合的表
	public Set<String> getSetsss() {
		return setsss;
	}
	public void setSetsss(Set<String> setsss) {
		this.setsss = setsss;
	}
	
	
	private Map<String,String> map=new HashMap<String, String>();
	@ElementCollection(fetch=FetchType.EAGER)
	@CollectionTable(name="xx_map")
	public Map<String, String> getMap() {
		return map;
	}
	public void setMap(Map<String, String> map) {
		this.map = map;
	}
}
